package com.foreknow.demo6;

public class B extends A{
    int x = 2;
    public void func(){
        System.out.println("222222222222");
    }

    public static void main(String[] args) {
        B b = new B();
        b.func();
        System.out.println(b.x);
        A x = new B();
        x.func();
        System.out.println(x.x);
    }
}
